using System;
using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Requests.Objects;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Requests
{
	public static class EntityOfflineOrderDetailsCreateExtend
{
		public static OfflineOrderDetails ToCreateEntity(this RequestOfflineOrderDetailsDto dto)
		{
			return new OfflineOrderDetails
			{
				OodOfflineOrderId = dto.offlineOrderId,
				OodProductId = dto.productId,
				OodCount = dto.count,
				OodProductName = dto.productName,
				OodSinglePrice = dto.singlePrice,
				OodProductPrice = dto.productPrice,
				OodProductPayPrice = dto.productPayPrice,
				OodDiscount = dto.discount,
				OodDeduction = dto.deduction,
			};
		}
	}
}
